CodeOrigin Home

Category

Distributed Systems

3 articles

Failure as an Interface: A Taxonomy of Errors Callers Can Act On

Error responses are read more often than success payloads, usually by someone deciding whether to retry, escalate, or rewrite a request. A practical taxonomy, stable codes, structured details, and a short review checklist turn failure output into a deliberate interface.

Cursors That Keep Their Word: Stable Pagination Under Concurrent Writes

Cursors That Keep Their Word: Stable Pagination Under Concurrent Writes

Offset-based pagination makes a positional promise that a changing table cannot keep. This article derives keyset pagination from the need for a stable total order, implements an opaque-cursor endpoint with tie-breaker columns, and outlines a migration path for APIs still shipping OFFSET and LIMIT.

Cron Is Not a Scheduler: Durable Background Jobs From Guarantees Upward

Cron Is Not a Scheduler: Durable Background Jobs From Guarantees Upward

A cron entry is a timer, not a job system — it keeps no record of work, retries nothing, and cannot tell you what failed last night. Starting instead from the guarantees real async work requires, this walkthrough builds a minimal queue-backed worker and shows where observability and failure drills belong.